from analysis.search.impl.DA51job import DA51job
from crawler_core.constant.constants import Constants


class SearchAnalysisProxy(object):

    def __init__(self):
        pass

    def analysis_cache(self, data):
        if data[Constants.CACHE_SEARCH_TYPE] == Constants.CHANNEL_TYPE_51JOB:
            resume_data = data[Constants.CACHE_SEARCH_DATA]
            result = DA51job().analysis_cache(resume_data)
        else:
            result = None
        return result
